package com.csiec.clock.activity;

import android.os.Bundle;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProviders;

import com.csiec.clock.R;
import com.csiec.clock.bean.UserInfo;
import com.csiec.clock.databinding.ActivityAboutBinding;
import com.csiec.clock.view.model.AboutViewModel;

public class AboutActivity extends AppCompatActivity {

    private ActivityAboutBinding binding;
    private AboutViewModel aboutViewModel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);

        //隐藏ActionBar
        if (getSupportActionBar() != null) {
            ActionBar actionBar = getSupportActionBar();
            actionBar.hide();
        }

        binding = DataBindingUtil.setContentView(this, R.layout.activity_about);

        //LiveData
        aboutViewModel = ViewModelProviders.of(this).get(AboutViewModel.class);
        binding.setAboutViewModel(aboutViewModel);
        binding.setLifecycleOwner(this);
        aboutViewModel.init(this, binding);

    }
}
